//定义数据返回的全部数据接口类型
export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
}
//定义数组数据接口类型
export interface Records {
  id?: number;
  spuName: string;
  description: string;
  category3Id: number | string;
  tmId: number;
  spuSaleAttrList: null;
  spuImageList: null;
  spuPosterList: null;
}
//定义数组
export type Record = Records[];
//定义接口返回的数据接口
export interface ResponesSpu extends ResponseData {
  data: {
    records: Record;
    total: number;
    size: number;
    current: number;

    searchCount: boolean;
    pages: number;
  };
}
//所有品牌的数据
export interface resAllTradeMark {
  id: number;
  tmName: string;
  logoUrl: string;
}
//所有品牌返回的数据类型
export interface resAllTradeMarkList extends ResponseData {
  data: resAllTradeMark[];
}
//对应品牌的图片
export interface SpuImage {
  id: number;
  spuId: number;
  imgName: string;
  imgUrl: string;
}
//定义对应品牌图片的数据类型
export interface SpuImageList extends ResponseData {
  data: SpuImage[];
}
//定义某一个品牌下对应的品牌属性
export interface SaleAttrValueList {
  id?: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrValueName: string;
  saleAttrName: string;
  isChecked: null;
}

export type spuSaleAttrValueList = SaleAttrValueList[];

export interface SpuAttrList {
  id?: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrName: string;
  spuSaleAttrValueList: spuSaleAttrValueList;
}
//定义数据返回的类型
export interface SpuAttrResponse extends ResponseData {
  data: SpuAttrList[];
}
//定义整个项目的品牌属性
export interface AttrList {
  id: number;
  name: string;
}

//定义返回整个项目的品牌属性ts类型
export interface AttrResponse extends ResponseData {
  data: AttrList[];
}
//sku数据类型
export interface skuAttr {
  attrId: number;
  skuId: number;
}
export interface skuSale {
  saleAttrId: number;
  saleAttrValueId: number;
}
export interface SkuDate {
  category3Id: number | string;
  spuId: number | string;
  tmId: number | string;
  weight: number | string;
  price: number | string;
  skuDesc: number | string;
  skuName: string;
  skuAttrValueList: skuAttr[];
  skuDefaultImg: string;

  skuSaleAttrValueList?: skuSale[];
}

//获取sku接口类型
export interface SkuInfo extends ResponseData {
  data: SkuDate[];
}
